//
//  BaseModel.swift
//  SwiftProject
//
//  Created by qindong on 2021/3/12.
//

import UIKit

@objcMembers

class BaseModel: NSObject, HandyJSON {
//    var id : Int = 0
    init(_ dict : [String : Any]) {
        super.init()
        setValuesForKeys(dict)
    }
    
    override required init() {
        super.init()
    }

    // 当model的属性名和json里的对应不上的时候，model里实现mapping函数去对应key
    func mapping(mapper: HelpingMapper) {
        //例如
//        mapper <<< id <-- "cid"
    }
    
    override func setValue(_ value: Any?, forUndefinedKey key: String) {
        
    }
}
